home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 22
/
Cream of the Crop 22.iso
/
doom
/
quake2.zip
/
TF1_2SRC.ZIP
/
QUAKE
/
FORTRESS
/
SOURCE
/
MSKIN.QC
< prev
next >
Wrap
Text File
|
1996-09-10
|
2KB
|
78 lines
/*
TeamFortress 1.2 - 7/9/96
Robin Walker, John Cook, Ian Caughley.
Functions specific to the Multiskin section of TeamFortress.
*/
// Prototypes
void(float skinno) Multiskin_SetSkin;
void() Multiskin_NextSkin;
void() Multiskin_PrevSkin;
void() Multiskin_DisplayName;
//=========================================================================
// Set the Skin of the self entity to skinno
void(float skinno) Multiskin_SetSkin =
{
// If Classkin is on, prevent skin changes
if (!(toggleflags & TFLAG_SKIN))
return;
if (skinno > MS_MAX_SKIN)
{
skinno = MS_MAX_SKIN;
}
self.skin = skinno;
Multiskin_DisplayName();
};
//=========================================================================
// Increment the skin of the self entity
void() Multiskin_NextSkin =
{
// If Classkin is on, prevent skin changes
if (!(toggleflags & TFLAG_SKIN))
return;
self.skin = self.skin + 1;
if (self.skin > MS_MAX_SKIN)
self.skin = 0;
Multiskin_DisplayName();
};
//=========================================================================
// Decrement the skin of the self entity
void() Multiskin_PrevSkin =
{
// If Classkin is on, prevent skin changes
if (!(toggleflags & TFLAG_SKIN))
return;
self.skin = self.skin - 1;
if (self.skin < 0)
self.skin = MS_MAX_SKIN;
Multiskin_DisplayName();
};
//=========================================================================
// Write a description of the self entity's current skin to the self entity
void() Multiskin_DisplayName =
{
local string sn;
if (self.classname != "player")
return;
// Display skin name
sprint(self, "Skin no ");
sn = ftos(self.skin);
sprint(self, sn);
sprint(self, ".\n");
};